let router = require('koa-router');

let routers = new router()

routers.get('/goods', (ctx, next) => {
  ctx.body = {
    code: 1,
    slider: [{
      id: 1,
      url: 'http://www.baidu.com/',
      image: 'https://madapao.vip:8888/img/1533200532333.png'
    }, {
      id: 2,
      url: 'http://www.baidu.com/',
      image: 'https://madapao.vip:8888/img/1533459842909.png'
    }],
    data: {
      fe: [{
        id: 1,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }, {
        id: 2,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }],
      python: [{
        id: 3,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }, {
        id: 4,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }],
      java: [{
        id: 5,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }, {
        id: 6,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }],
      bigdata: [{
        id: 7,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }, {
        id: 8,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }],
      ai: [{
        id: 9,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }, {
        id: 10,
        title: 'vue2.x实战',
        price: '100',
        img: 'https://madapao.vip:8888/img/1533200532333.png',
        count: 100
      }]
    },
    keys: ['fe', 'python', 'java', 'bigdata', 'ai'],
  }
})

module.exports = routers.routes()